package com.pubinfo.passbook.common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pubinfo.passbook.common.entity.TPassbook;
import com.pubinfo.passbook.common.entity.TWiteoffInstance;
import com.pubinfo.passbook.common.model.bo.witeoff.QueryWiteoffInstanceParam;
import com.pubinfo.passbook.common.model.dto.financial.ClaimRecord;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TWiteoffInstanceMapper extends BaseMapper<TWiteoffInstance> {
  
  List<TWiteoffInstance> QueryWiteoffInstanceList(@Param("instanceParam")
                                                      QueryWiteoffInstanceParam instancdParam);
  
  Long QueryWiteoffInstanceListCount(@Param("instanceParam")
                                         QueryWiteoffInstanceParam instancdParam);
//
//  IPage<TWiteoffInstance> QueryWiteoffInstanceList(IPage<TWiteoffInstance> page, @Param("instanceParam")
  //  QueryWiteoffInstanceParam instancdParam);
  
  List<TWiteoffInstance> selectStatusNotReady();

  List<TWiteoffInstance> selectOpenStatusNotReady();
  
  List<TWiteoffInstance> selectCanCancelOrFeedback();
  
  List<ClaimRecord> selectClaimRecordByOtherSystemMainId(String otherSystemMainId);
  
  List<TPassbook> selectTPassbookByOtherSystemMainId(String otherSystemMainId);
  
  TWiteoffInstance selectTWiteoffInstanceByAuditor(@Param("id") String id, @Param("districtId") String districtId);

  TWiteoffInstance selectTwiteoffInstanceByOtherSystemMainId(String otherSystemMainId);

  List<TWiteoffInstance> selectNeedSendShortMessage();

  Boolean updateIsNeedImage(@Param("id") List<String> id);

  Boolean updateByOtherSystemMainId(@Param("tWiteoffInstance") TWiteoffInstance tWiteoffInstance);

  Boolean deleteInstance(String otherSystemMainId);
}